package com.example.demo.zwpt.controller;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.demo.config.Result;
import com.example.demo.zwpt.ZwptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ZwptRestController
 * @Description: 对接政务平台接口
 * @Author gss
 * @Date 2021/9/23 14:46
 * @Version V1.0
 **/
@Api(tags = "对接政务平台接口")
@RestController
@RequestMapping("/rest")
public class ZwptRestController {

    @Autowired
    private ZwptService zwptService;


    @ApiOperation(value = "全量同步用户信息")
    @GetMapping(value="/getAllUser")
    public Result<?> getAllUser(){
        return zwptService.queryAllUser();
    }

    @ApiOperation(value = "全量同步部门信息")
    @GetMapping(value="/getAllOu")
    public Result<?> getAllOu(){
        return zwptService.getAllOu();
    }


    @ApiOperation(value = "增量同步信息")
    @GetMapping(value="/incrementData")
    public Result<?> incrementData(){
        return zwptService.queryAllIncrement();
    }

}
